﻿@model WaiGaoQiaoWeb.Models.SupplierVM
@{
    ViewBag.Title = "EditSupplier";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section Head
{
    @Html.Css("EditForm")
    <script type="text/javascript" language="javascript">
        $(document).ready(function () {
            $("form").makeValidationInline();
            //保存
            $("#btnSave").click(function (event) {
                if (!$("#fmEdit").valid()) {
                    return false;
                }
                $('#fmEdit').ajaxSubmit(function (callback) {
                    if (callback) {
                        CloseModelWindow(null, true);
                    }
                });
            });
            //关闭
            $("#btnCancel").click(function (e) {
                CloseModelWindow(null, false);
            });
        });              // end of document        
    </script>
}
@using (Html.BeginForm("SaveSupplierEdit", "Supplier", FormMethod.Post, new { id = "fmEdit" }))
{
    @Html.ValidationSummary(true)
    <div id="editFormWrapper">
        <br />
        @Html.HiddenFor(model => model.AddEdit)
        @Html.HiddenFor(model => model.OldSupplier_NO)
        <div class="editFormItems">
            <div class="editFormLabel">
                @Html.HiddenFor(model => model.ID)
                @Html.LabelFor(model => model.Supplier_NO)
            </div>
            <div class="editForm">
                @Html.TextBoxFor(model => model.Supplier_NO, new { Class = "uc",@style = "width:200px;" })<span style="color: Red;">*</span>
                @Html.ValidationMessageFor(model => model.Supplier_NO)
            </div>
        </div>
        <div class="editFormItems">
            <div class="editFormLabel">
                @Html.LabelFor(model => model.Supplier_Name)
            </div>
            <div class="editForm">
                @Html.TextBoxFor(model => model.Supplier_Name, new { @style = "width:200px;" })<span style="color: Red;">*</span>
                @Html.ValidationMessageFor(model => model.Supplier_Name)
            </div>
        </div>
        <div class="editFormItems">
            <div class="editFormLabel">
                @Html.LabelFor(model => model.Contact_Person)
            </div>
            <div class="editForm">
                @Html.TextBoxFor(model => model.Contact_Person, new { @style = "width:200px;" })
                @Html.ValidationMessageFor(model => model.Contact_Person)
            </div>
        </div>
        <div class="editFormItems">
            <div class="editFormLabel">
                @Html.LabelFor(model => model.Phone)
            </div>
            <div class="editForm">
                @Html.TextBoxFor(model => model.Phone, new { @style = "width:200px;" })
                @Html.ValidationMessageFor(model => model.Phone)
            </div>
        </div>
        <div class="editFormItems">
            <div class="editFormLabel">
                @Html.LabelFor(model => model.AddRess)
            </div>
            <div class="editForm">
                @Html.TextBoxFor(model => model.AddRess, new { @style = "width:200px;" })
                @Html.ValidationMessageFor(model => model.AddRess)
            </div>
        </div>
        <div class="editFormItems">
            <div class="editFormLabel">
                @Html.LabelFor(model => model.Remark)
            </div>
            <div class="editForm">
                @Html.TextBoxFor(model => model.Remark, new { @style = "width:200px;" })
                @Html.ValidationMessageFor(model => model.Remark)
            </div>
        </div>
    </div>
    <div class="buttonpanel">
        <div style="float: right; margin-right: 10px;">
            <a id="btnSave" href="javascript:void(0);" class="button"><span>保存</span></a> <a
                id="btnCancel" href="javascript:void(0);" class="button"><span>关闭</span></a>
        </div>
    </div>   
}
